home *** CD-ROM | disk | FTP | other *** search
/ Hottest 6 / Hottest 6 (1996)(PDSoft)[!].iso / pdsoft / demo_library / 4402.lha / BattleDuel_Install next >
Text File  |  1995-04-05  |  7KB  |  204 lines

  1. ;======================================================================
  2. ;
  3. ; BattleDuel Install Script $VER: Install 1.00 (5.4.95)
  4. ;
  5. ; Copyright © 1995 Jochen Terstiege
  6. ;
  7. ;======================================================================
  8. ;
  9. ;======================================================================
  10. ; language strings
  11. ;======================================================================
  12.  
  13. (if (= @language "deutsch")
  14.     (
  15.         (set #hello "\nWillkommen zur BattleDuel Installation...\n\n\Version 1.00")
  16.         (set #update (cat "Sie haben BattleDuel auf ihrem System schon installiert. "
  17.                                 "Alle alten Dateien werden gelöscht und die neuen werden installiert."))
  18.         (set #select_destination "Bitte wählen Sie aus, wo das BattleDuel-Verzeichnis erzeugt werden soll")
  19.         (set #destination_help (cat "Wählen Sie eine Partition oder ein Verzeichnis aus. "
  20.                                             "Ein Verzeichnis mit dem Namen 'BattleDuel' wird dort erzeugt."))
  21.         (set #install_to1 "\nBattleDuel nach \"")
  22.         (set #install_to2 "\" installieren?")
  23.         (set #startup "Ergänze user-startup")
  24.         (set #startup_help "Dieser Assign wird von BattleDuel gebraucht")
  25.         (set #have_fun "Viel Spaß mit BattleDuel...")
  26.         (set #which_chipset "Welchen Chipsatz haben Sie?")
  27.         (set #chipset_help (cat "Wenn Sie einen Amiga 4000 oder einen Amiga 1200 besitzen, dann "
  28.                                         "müssen Sie AGA wählen, ansonsten ECS!"))
  29.         (set #want_mwb_icons "Wollen Sie MagicWB Icons installieren?")
  30.         (set #mwb_icons (cat "MagicWB ist ein Set von Icons mit 8 Farben.\n"
  31.                                     "MagicWB ist © by Martin Huttenloher"))
  32.         (set #error_extract (cat "Fehler beim Entpacken der Datei: "))
  33.     )
  34.     (
  35.         (set #hello "\nWelcome to the BattleDuel Installation...\n\n\Version 1.00")
  36.         (set #update (cat "You already have BattleDuel installed on your system. "
  37.                                 "All old files will be deleted and the new ones installed."))
  38.         (set #select_destination "Select the location to install the BattleDuel directory")
  39.         (set #destination_help (cat "Choose a destination partition or directory. "
  40.                                             "A directory called 'BattleDuel' will be created there."))
  41.         (set #install_to1 "\nInstall BattleDuel to \"")
  42.         (set #install_to2 "\" ?")
  43.         (set #startup "Adding assign to user-startup")
  44.         (set #startup_help "This assign is needed by BattleDuel!")
  45.         (set #have_fun "Have fun with BattleDuel...")
  46.         (set #which_chipset "Which Chipset do you have?")
  47.         (set #chipset_help (cat "If you own an Amiga 4000 or Amiga 1200 then you must select AGA, "
  48.                                         "otherwise you must select ECS!"))
  49.         (set #want_mwb_icons "Do you want to install MagicWB icons?")
  50.         (set #mwb_icons (cat "MagicWB is a set of nice icons with 8 colors.\n"
  51.                                     "MagicWB is © by Martin Huttenloher"))
  52.         (set #error_extract (cat "Error while extracting from file: "))
  53.     )
  54. )
  55.  
  56. ;======================================================================
  57. ; variables
  58. ;======================================================================
  59.  
  60. (set inputdir    (pathonly @icon))        ; from where we were started
  61. (set bd_drawer "BattleDuel")            ; destination drawer name
  62. (set bd_dest    (getassign "BD"))        ; default destination
  63.  
  64. ;======================================================================
  65. ; welcome
  66. ;======================================================================
  67.  
  68. (message #hello)
  69.  
  70. ;======================================================================
  71. ; already there?
  72. ;======================================================================
  73.  
  74. (if (<> bd_dest "")
  75.     (; update
  76.         (set update true)
  77.         (message #update)
  78.     )
  79.     (; first installation
  80.         (set update false)
  81.         (set bd_dest
  82.             (askdir
  83.                 (prompt #select_destination)
  84.                 (default "Work:")
  85.                 (help #destination_help)
  86.             )
  87.         )
  88.     )
  89. )
  90. (set @default-dest bd_dest)
  91.  
  92. ;======================================================================
  93. ; delete old files
  94. ;======================================================================
  95.  
  96. ;(if (= update true)
  97. ;    (
  98. ;        (set del_pattern "#?")
  99. ;        (foreach bd_dest del_pattern
  100. ;            (delete (tackon bd_dest @each-name))
  101. ;        )
  102. ;    )
  103. ;)
  104.  
  105. ;======================================================================
  106. ; make directory
  107. ;======================================================================
  108.  
  109. (if (= update false)
  110.     (
  111.         (set bd_dest (tackon bd_dest bd_drawer))
  112.         (message (cat #install_to1 bd_dest #install_to2))
  113.         (makedir bd_dest (infos))
  114.         (makeassign "BD" bd_dest)
  115.     )
  116. )
  117.  
  118. ;======================================================================
  119. ; ask for chipset
  120. ;======================================================================
  121.  
  122. (set aga
  123.     (askbool
  124.         (prompt #which_chipset)
  125.         (help #chipset_help)
  126.         (choices "ECS" "AGA")
  127.         (default 1)
  128.     )
  129. )
  130.  
  131. ;======================================================================
  132. ; extract files
  133. ;======================================================================
  134.  
  135. (procedure extract
  136.     (set lx (cat "lx -a -m -q x \"" (tackon inputdir current) ".lha\" * " (tackon "BD:" dir_dest)))
  137.     (working "Installing " current)
  138.     (if (<> (run lx) 0)
  139.         (message #error_extract current)
  140.     )
  141.  
  142. (complete 0)
  143. (set current "Program")             (set dir_dest "") (extract)
  144. (complete 10)
  145. (if (= aga 1)
  146.     ( (set current "Gfx_ECS")        (set dir_dest "Gfx/ECS/") (extract)
  147.       (set current "Landscapes_ECS") (set dir_dest "Landscapes/ECS/") (extract) )
  148.     ( (set current "Gfx_AGA")        (set dir_dest "Gfx/AGA/") (extract)
  149.       (set current "Landscapes_AGA") (set dir_dest "Landscapes/AGA/") (extract) )
  150. )
  151. (complete 20)
  152. (set current "Mods")                (set dir_dest "Mods/") (extract)
  153. (complete 60)
  154. (set current "Settings")            (set dir_dest "Settings/") (extract)
  155. (complete 70)
  156.  
  157. ;======================================================================
  158. ; copy selected language
  159. ;======================================================================
  160.  
  161. (if (= @language "deutsch")
  162.     ( (set current "Deutsch") (set dir_dest "") (extract) )
  163.     ( (set current "English") (set dir_dest "") (extract) )
  164. )
  165. (complete 80)
  166.  
  167. ;======================================================================
  168. ; add MagicWB icons?
  169. ;======================================================================
  170.  
  171. (set mwb
  172.     (askbool
  173.         (prompt #want_mwb_icons)
  174.         (help #mwb_icons)
  175.         (choices "Yes" "No")
  176.         (default 1)
  177.     )
  178. )
  179.  
  180. (if (= mwb 1)
  181.     ( (set current "MWB_Icons") (set dir_dest "") (extract) )
  182.     ( (set current "Icons") (set dir_dest "") (extract) )
  183. )
  184. (complete 90)
  185.  
  186. ;======================================================================
  187. ; modify user-startup
  188. ;======================================================================
  189.  
  190. (if (= update false)
  191.     (
  192.         (startup "BattleDuel"
  193.             (prompt #startup)
  194.             (command (cat "Assign >NIL: BD: " bd_dest))
  195.             (help #startup_help)
  196.         )
  197.     )
  198. )
  199.  
  200. (complete 100)
  201.  
  202. (exit #have_fun)
  203.